package org.objective.base;

import org.objective.service.Loader;

/**
 *
 * @author gus
 */
public interface ObjectCollection<T, TOwner> extends Iterable<T>
{
    public int size();
    public boolean isEmpty();
    
    public T get(int id);
    public T get(String name);

    public T newInstance() throws Exception;
    public T newInstance(Construction constructionCallback ) throws Exception;
    
    public void load( Loader loader, long[] fieldIdList ) throws Exception;
    
    public T [] toArray();
    public T [] toArray(ObjectFilter<T> filter);
    
}
